-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ilib-loctool-regex: Add escaping support #75
base: main
Are you sure you want to change the base?
Conversation
- Now unescapes strings that it extracts according to the escape style set into each mapping. This allows you to do different escaping for different types of files.
- Each mapping maps a particular set of glob expressions to settings for files of a particular type. These settings can now contains an escapeStyle parameter that does unescaping in the manner of the named programming language.
- will deny a README file that mentions the debugger. Now only denies it if it finds "debugger;" with the semi-colon and only if the file path ends with ".js"
🦋 Changeset detectedLatest commit: 49c1a9e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
- The reason is that in many programming languages, some types of strings are unescaped differently than others, even within the same programming language. eg. double- vs. single-quoted strings in PHP
|
||
# Check for debugger statements in JavaScript files | ||
lines=$(grep -n 'debugger' $files) | ||
lines=$(grep -n 'debugger;' $files) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The git hook wouldn't let me push this branch because the README.md mentioned "debugger" in it. So, I made this apply only to js files and only when it is "debugger;" That's why this had to be included here.
escapeStyle
to each expression